const Sequelize = require('sequelize');

const sequelize = new Sequelize('screendb', 'root', 'root', {
    host: 'localhost',
    port: '3306',
    dialect: 'mysql'
});


sequelize
    .authenticate()
    .then(() => {
        console.log('数据库连接成功');
    })
    .catch(err => {
        console.error('数据库连接失败:', err);
    });

module.exports = { Sequelize, sequelize }
